home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 7
/
007.d81
/
header changer
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
2KB
|
89 lines
1 n$="[163][183][184][162][185][175][164][163][183][184][162][185][175][164]"
2 printchr$(14)
3 gosub 1000
5 dimse%(256)
10 ch=8:dr=0
15 z$=chr$(0)
17 poke198,0
18 print"[147][201]nsert the correct disk & press a key":poke198,0:wait198,1
19 getk$
20 open15,8,15
30 open8,8,8,"#"
32 print#15,"b-p:";8;0
45 print#15,"u1:";ch;dr;18;0
50 input#15,a,a$,b$,c$
60 :
62 ifa<>0thenprint"[217]ou just had a disk error!"
70 ifa<>0thenprinta,a$,b$,c$:close8:close15:goto18
80 forx=0to255:get#8,a$
90 se%(x)=asc(a$+z$)
100 print".";:next
110 print"[147]disk name = ";
120 forx=144to161:printchr$(se%(x));:next
130 print
135 print"id = ";
140 printchr$(se%(162))chr$(se%(163))
150 print
160 input"new header [157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]";h$
170 iflen(h$)<0orlen(h$)>16thenprint"[145]";:goto160
200 print:print:print"all this o.k.?":poke198,0:wait198,1:getk$:ifk$<>"y"andk$<>"n"then200
210 ifk$="n"then150
220 forx=1tolen(h$)
230 se%(x+143)=asc(mid$(h$,x,1))
240 next
245 :
250 if144+len(h$)<161thenforx=144+len(h$)to161:se%(x)=160:next
260 :
270 rem se%(162)=asc(left$(id$,1))
280 rem se%(163)=asc(right$(id$,1))
290 :
300 print#15,"b-p:";8;0
310 forx=0to255
320 print#8,chr$(se%(x));:print".";
330 nextx
332 print
340 :
350 print#15,"u2:";ch;dr;18;0
355 input#15,a,a$,b$,c$
356 printa,a$,b$,c$
560 poke783,peek(783)and254
570 poke781,24:poke782,13:sys65520
580 print"<another disk?>"
585 print#15,"i0"
590 poke198,0:wait198,1:geta$:ifa$="y"then:close8:close15:goto17
600 close8:close15
700 goto63000
1000 print"[147]":poke53281,0:poke53280,6:print""
1010 print:print:print:print" [200][197][193][196][197][210][160][195][200][193][206][199][197][210]"
1020 print:print:print:print" by"
1030 print:print:print:print" [193]lan [199]ardner"
1032 print" [195]irca 1984"
1040 gosub2000
1050 :
1060 print"[147] [206]ow you can change the header on any":print
1070 print"of your disks. ":print:print
1080 print" [212]he program will read in the original":print
1090 print"header and id and print these out. [217]ou":print
1100 print"will then be prompted for a new header.":print
1110 print" [193]fter entering this you will be ":print
1120 print"asked if your input is o.k. [201]f not, ":print
1130 print"you can change it again. [201]f your":print
1140 print"input is o.k. it will then change the ":print
1150 print"header on your disk."
1160 gosub2000
1170 :
1200 return
2000 rem <press a key> stuff
2010 poke783,peek(783)and254
2020 poke781,23:poke782,13:sys65520:print"<press a key>"
2030 forx=1tolen(n$)
2032 a$=mid$(n$,x,1):b$=mid$(n$,len(n$)-x+1,1)
2040 poke781,23:poke782,11:sys65520:printa$
2045 poke781,23:poke782,28:sys65520:printb$
2050 nextx
2060 getk$:ifk$=""then2030
2070 return
63000 rem connect back to l.s.
63002 print"[147]load"chr$(34)"payload"chr$(34)",8":print"run"
63004 poke198,0:poke631,13:poke632,13:poke198,2:end